package com.example.runningdemo.designModel.builder;

/**
 * @program: Running-Demo
 * @description: 车建造模式
 * @author: kangwei
 * @create: 2024-08-11 14:33
 **/
public class CarBuilder implements PersonBuilder {

    private Car car;

    public CarBuilder() {
        car = new Car();
    }

    @Override
    public Car createCar() {
        return car;
    }

    @Override
    public void builderGlass() {
        car.setGlass("装饰玻璃");
    }

    @Override
    public void builderTyre() {
        car.setTyre("组装轮胎");
    }

    @Override
    public void builderName() {
        car.setName("奥迪");
    }
}
